package org.jiuling.netty.test.handler.service;

import io.netty.channel.Channel;
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
import org.jiuling.netty.handler.service.BusinessHandlerService;

/**
 * @author 紫灵
 * @date 2025年07月11日 14时41分36秒
 */
public class WebocketBusinessHandlerServiceImpl implements BusinessHandlerService<String> {

    @Override
    public void preparationProcessing(Channel channel) {
        System.out.println("1234567");
    }

    @Override
    public void handshakeComplete(Channel channel, WebSocketServerProtocolHandler.HandshakeComplete handshake) {
        System.out.println("123123");
    }

    @Override
    public void readMessage(Channel channel, String message) {
        System.out.println(message);
    }

    @Override
    public void removed(Channel channel) {
        System.out.println("1231231");
    }

    @Override
    public void exception(Channel channel, Throwable throwable) {
        System.out.println(throwable.getMessage());
    }
}
